package com.codemart.lanze.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 公共的异常处理
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class BaseException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private int code = 500;
	private String msg;

	public BaseException(String msg) {
		super(msg);
		this.msg = msg;
	}

	public BaseException(int code, String msg) {
		super(msg);
		this.code = code;
		this.msg = msg;
	}

	public BaseException(int code, String msg, Throwable e) {
		super(msg, e);
		this.code = code;
		this.msg = msg;
	}
}
